package passworks;

public class Wire {

    private GateBase outEnd;
    private boolean isStable;
    private boolean state;

    /*
     * ID a Logger mukodesehez
     */
    static int ID = 0;
    private int ownID;

    public Wire(GateBase gate) {

        Logger.Print("Wire", "Wire", Direction.IN, ID);

        outEnd = gate;
        ownID = ID;

        Logger.Print("Wire", "Wire", Direction.OUT, ID);
        
        ID++;
    }

    public GateBase GetGate() {
        Logger.Print("Wire", "GetGate", Direction.IN, ownID);
        Logger.Print("Wire", "GetGate", Direction.OUT, ownID);
        return outEnd;
    }

    public boolean GetState() {
        Logger.Print("Wire", "GetState", Direction.IN, ownID);
        Logger.Print("Wire", "GetState", Direction.OUT, ownID);
        return false;
    }
    public void SetState(boolean b) {
        Logger.Print("Wire", "SetState", Direction.IN, ownID);
        Logger.Print("Wire", "SetState", Direction.OUT, ownID);
    }

    public boolean GetStable() {
        Logger.Print("Wire", "GetStable", Direction.IN, ownID);
        Logger.Print("Wire", "GetStable", Direction.OUT, ownID);
        return isStable;
    }
    
    public void SetStable(boolean b) {
        Logger.Print("Wire","SetStable",Direction.IN,ownID);
        isStable = b;
        Logger.Print("Wire","SetStable",Direction.OUT,ownID);
    }
}
